/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-07-24 19:37:06
 * @LastEditors: 武兴创 superjava@vip.qq.com
 * @LastEditTime: 2024-08-28 17:43:14
 * @FilePath: \SGFEM\DataStructure\FEM\Element\include\CTRIA3Data.h
 * @Description: 定义等参数膜弯曲或平面应变三角形板单元
 * CTRIA3
 */

#pragma once
#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Element/ElementBase.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct DECLSPEC CTRIA3Data : public ElementBase
{
    SG::DataStructure::Common::Id   m_pId      = 0;                     ///< property's id
    SG::DataStructure::Common::Id   m_g[3]     = { 0 };                 ///< nodes' id
    SG::DataStructure::Common::Real m_theta    = 0.0;                   /// 材料属性方向角度
    SG::DataStructure::Common::Real m_zoffs    = 0.0;                   /// 从网格点的表面偏移到元素参考平面
    SG::DataStructure::Common::I64  m_tflag    = 0.0;                   /// 表示Ti值的含义
    SG::DataStructure::Common::Real m_ti[3]    = { -1.0, -1.0, -1.0 };  /// 单元膜厚度
    SG::DataStructure::Common::Id   m_mcId     = -1.0;                  /// 材料坐标系号
    SG::DataStructure::Common::Id   m_domainId = 0;                     ///< nodes' id

    static ElementTypes GetType ()
    {
        return ElementTypes::ELETYPE_ShellTria3;
    };
};

/// @brief 判断两个CTRIA3Data是否相等
/// @param a
/// @param b
/// @return
DECLSPEC bool operator== (const CTRIA3Data& a, const CTRIA3Data& b);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE
